package es.ucm.fdi.isbc.viviendas.vista;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JDialog;

public class Formulario extends JDialog {
	
	private static final long serialVersionUID = 1L;
	
	Ventana miVentana;
	
	public Formulario(){
		this.addWindowListener(new WindowAdapter() {

			public void windowClosing(WindowEvent e) {
			miVentana.chapando();
			}
		});

		miVentana = new Ventana();
		
		this.setTitle("<< Tasador de Casas >>");
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		setSize(screenSize);
		this.setContentPane(miVentana);
		
		this.setVisible(true);
	}
	
	public boolean goes(){
		return miVentana.getRun();
	}
	
	public String getDescripcion(){
		return miVentana.getDescripcion();
	}
	
	//Prueba
	public static void main(String[] args){
		Formulario miFormulario= new Formulario();
	}
}
